package cn.zhiwen.reflectController;

import cn.zhiwen.entity.Student;

public class ReflectDemo {

    public static void main(String[] args) {
        Student student = new Student();
        Class studentClass = student.getClass();
        System.out.println(studentClass);

        Class<Student> studentClass1 = Student.class;
        System.out.println(studentClass==studentClass1);

        Class aClass = null;
        try {
            aClass = Class.forName("cn.zhiwen.entity.Student");
            System.out.println(aClass==studentClass1);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

    }

}
